package ru.nsu.ccfit.kalah.game;

import java.util.ArrayList;
import java.util.List;

public class HistoryBuffer<E> {
    private List<E> buffer = new ArrayList<E>();

    public void push(E element) {
        buffer.add(element);
    }

    public boolean isEmpty() {
        return buffer.isEmpty();
    }

    public E pop() {
        return buffer.remove(buffer.size() - 1);
    }
}
